-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registering JMX Exporter build info #279
Conversation
By adding the Implementation-Version manifest entry it is possible to retrieve the lib version at runtime by checking the class Package. This allows the tracking of which JVMs are running which versions of the exporter. Closes #278 Signed-off-by: Hugo Picado <hugo.pcd@gmail.com>
Hi @brian-brazil. Would you please review this PR regarding #278? |
Does this have to apply only to the agent, could it not work for the http server too? |
@brian-brazil I was not able to retrieve the implementation-version from the http server package in the same way. Some research is required. I may open a new PR for that as soon as I find a solution for it. Is this ok? |
@brian-brazil Actually, it works for the HTTP Server as well if we run through the fat jar, as I'm able to inject the version into the manifest through the assembly plugin. Shall I proceed with the changes to allow it in this PR? |
Please go ahead. |
import io.prometheus.client.Collector; | ||
import io.prometheus.client.GaugeMetricFamily; | ||
|
||
import java.util.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be explicit in your imports
As now we are exporting the build info for different modules, besides the version, the name of the module was also added so we can distinguish between both. Signed-off-by: Hugo Picado <hugo.pcd@gmail.com> Closes #278
@brian-brazil I pushed the changes to enable this to HTTP Server as well. Also, besides the version, I included the name as it allows to distinguish between both the agent or the HTTP server. Could you please check? |
Thanks! |
* Registering JMX Exporter build info By adding the Implementation-Version manifest entry it is possible to retrieve the lib version at runtime by checking the class Package. This allows the tracking of which JVMs are running which versions of the exporter. Closes prometheus#278 Signed-off-by: Hugo Picado <hugo.pcd@gmail.com> * Registering jmx_exporter build info for HTTP Server As now we are exporting the build info for different modules, besides the version, the name of the module was also added so we can distinguish between both. Signed-off-by: Hugo Picado <hugo.pcd@gmail.com> Closes prometheus#278
By adding the Implementation-Version manifest entry it is possible
to retrieve the lib version at runtime by checking the class Package.
This allows the tracking of which JVMs are running which versions of
the exporter.
Closes #278